how to get name through id from mysql using php

75

 <?php
                   $value = $res['id'];
                   $selectquery2 = " select id,name from table where id = '$value'";
                                $resu2 = $database->query($selectquery2);
                                if ($res2 = mysqli_fetch_array($resu2)) { ?>
                                    <td name="id"><?php echo $res2['name']; ?></td>
                                <?php }
                                ?>

Comments

Submit
0 Comments